<?php
$baseurl = substr('http://'.$_SERVER['HTTP_HOST'].$_SERVER['SCRIPT_NAME'],0,-8);
$result = file_get_contents($baseurl);
echo $baseurl;